#ifndef OPERATIONSBSDGENERATOR_H_
#define OPERATIONSBSDGENERATOR_H_

#include "graph_support/alg_correctness_tests/generate_graph/IGraphGenerator.h"

#include <vector>

#include "graph_support/alg_correctness_tests/generate_graph/IGraphOperation.h"


namespace generate_graph
{

template< typename GraphT > // = IGraphGenerator::DefaultGenerationGraph
IGraphGenerator::GraphPtr NewGraphFnTmpl( const std::vector< int > & vertices, bool isBidirected )
{
	return IGraphGenerator::GraphPtr(
			new GraphT( vertices, isBidirected ) );
}

class OperationsBsdGenerator : public IGraphGenerator
{
public:
	/**
	 * NewGraphFn
	 */
	typedef IGraphGenerator::GraphPtr ( * NewGraphFn ) ( const std::vector< int > &, bool );

public:
	OperationsBsdGenerator(
			const std::string & name,
			size_t initVerticesCount,
			const std::vector< IGraphOperationPtr > & operations,
			NewGraphFn newGraphFn = NULL,
			bool generateBidirected = false
	);

	virtual GraphPtr generate();
	virtual std::string getName();

private:
	std::string name;
	size_t initVerticesCount;
	bool generateBidirected;
	std::vector< IGraphOperationPtr > operations;
	NewGraphFn newGraphFn;
};

}

#endif /* OPERATIONSBSDGENERATOR_H_ */
